﻿Public Class clsGraphEntryCollection
    Private m_pEntries As Dictionary(Of String, Single)

    Public Event Entries_Changed(ByVal sender As clsGraphEntryCollection)

    Public Sub New()
        m_pEntries = New Dictionary(Of String, Single)
    End Sub

    Public Sub AddValue(ByVal sDescription As String, ByVal dValue As Single)
        If Not m_pEntries.ContainsKey(sDescription) Then
            m_pEntries.Add(sDescription, dValue)
            RaiseEvent Entries_Changed(Me)
        End If
    End Sub
    Public Sub RemoveValue(ByVal sDescription As String)
        If m_pEntries.ContainsKey(sDescription) Then
            m_pEntries.Remove(sDescription)
            RaiseEvent Entries_Changed(Me)
        End If
    End Sub

    Public ReadOnly Property Entries As Dictionary(Of String, Single)
        Get
            Return m_pEntries
        End Get
    End Property
End Class
